home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 17 / CU Amiga Magazine's Super CD-ROM 17 (1997)(EMAP Images)(GB)[!][issue 1997-12].iso / CUCD / Programming / AMOSList / AMOSLIST.0997 / 000141_amos-request@svcs1.digex.net_Mon Sep 15 21:39:16 1997.msg < prev    next >
Text File  |  1997-10-01  |  7KB  |  226 lines

  1. Received: from svcs1.digex.net (svcs1.digex.net [204.91.197.224])
  2.     by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id VAA18873
  3.     for <mcox@access.digex.net>; Mon, 15 Sep 1997 21:39:13 -0400 (EDT)
  4. Received: (from daemon@localhost)
  5.     by svcs1.digex.net (8.8.5/8.8.5) id QAA01181
  6.     for amos-out; Mon, 15 Sep 1997 16:56:58 -0400 (EDT)
  7. Received: from mail2.access.digex.net (mail2.access.digex.net [205.197.247.3])
  8.     by svcs1.digex.net (8.8.5/8.8.5) with ESMTP id QAA01177
  9.     for <amos-list@svcs1.digex.net>; Mon, 15 Sep 1997 16:56:56 -0400 (EDT)
  10. Received: from leary.huron.net (root@leary.huron.net [205.150.207.2])
  11.     by mail2.access.digex.net (8.8.5/8.8.5) with ESMTP id QAA17563
  12.     for <amos-list@access.digex.net>; Mon, 15 Sep 1997 16:56:36 -0400 (EDT)
  13. Received: from golden.net (ppp18-ts1-kw.huron.net [205.150.207.67])
  14.     by leary.huron.net (8.8.5/8.8.5) with SMTP id QAA09287
  15.     for <amos-list@access.digex.net>; Mon, 15 Sep 1997 16:53:02 -0400
  16. From: "Mr. Giark To You" <joehick@golden.net>
  17. To: AMOS List <amos-list@access.digex.net>
  18. Date: Mon, 15 Sep 1997 16:55:13 -0500
  19. Message-ID: <yam7197.670.4074016@huron.net>
  20. X-Mailer: YAM 1.3.3 - Amiga Mailer by Marcel Beck
  21. Subject: TCP
  22. MIME-Version: 1.0
  23. Content-Type: text/plain
  24. Status: O
  25. X-Status: 
  26.  
  27. Here's a .guide file containing the TCP commands from the GUI extension. I was
  28. going to send them to Pietro directly, but a lot of you already have the GUI
  29. extension. Anyway, following is the .giude file.
  30.  
  31. --------------CUT----------------
  32. @DATABASE TCP Commands
  33.  
  34. @NODE Main "GUI Extension TCP Commands"
  35.  
  36.                                    @{b}GUI Extension@{ub}
  37.  
  38.                                    @{u}TCP Commands@{uu}
  39.  
  40.                                   @{" Introduction " LINK "Introduction"}
  41.                                   @{"   Commands   " LINK "Commands"}
  42. @ENDNODE
  43.  
  44. @NODE "Introduction"
  45. @NEXT "Commands"
  46. @PREV "Main"
  47. @TOC "Main"
  48.                                   !!!
  49.                                   o o
  50.                   +-----------oOO-(_)-OOo----------------+
  51.                   |                                      |
  52.                   |  Pietro Ghizzoni - Dairymen Soft     |
  53.                   |     E-Mail:  ghizzo@agonet.it        |
  54.                   |            Team AMIGA                |
  55.                   |                                      |
  56.                   | Amos Professional Team Coordinator   |
  57.                   |                                      |
  58.                   +--------------------------------------+
  59.  
  60. This document was created by Giark (C. Edward Stewart) after examining the
  61. TCP example programs and email response from Pietro Ghizzoni.
  62. @ENDNODE
  63.  
  64. @NODE "Commands"
  65. @NEXT "Tcp Open"
  66. @PREV "Introduction"
  67. @TOC "Main"
  68.  
  69.                                @{u}The TCP Command List@{uu}
  70.  
  71.                                   @{" =Tcp Open    " LINK "Tcp Open"}
  72.                                   @{" =Tcp F Open  " LINK "Tcp F Open"}
  73.                                   @{" =Tcp Put$    " LINK "Tcp Put$"}
  74.                                   @{" =Tcp Read    " LINK "Tcp Read"}
  75.                                   @{" =Tcp Code    " LINK "Tcp Code"}
  76.                                   @{" =Tcp Time    " LINK "Tcp Time"}
  77.                                   @{" =Tcp Send    " LINK "Tcp Send"}
  78.                                   @{" Tcp Reset    " LINK "Tcp Reset"}
  79.                                   @{" =Tcp Channel " LINK "Tcp Channel"}
  80.                                   @{" =Tcp Buffer  " LINK "Tcp Buffer"}
  81. @ENDNODE
  82.  
  83. @NODE "Tcp Open"
  84. @NEXT "Tcp F Open"
  85. @PREV "Commands"
  86. @TOC "Main"
  87. =Tcp Open(<logical file number>,<port data$>)
  88.  
  89. Open a TCP channel using the port data
  90.  
  91. e.g. X=Tcp Open(1,"timequake.unterlab.org/6667") to open a port to IRC
  92. @ENDNODE
  93.  
  94. @NODE "Tcp F Open"
  95. @NEXT "Tcp Put$"
  96. @PREV "Tcp Open"
  97. @TOC "Main"
  98. =Tcp F Open(<logical File number>,<path$>)
  99.  
  100. Open a file to write your incoming TCP data to
  101.  
  102. e.g. X=Tcp F Open(2,"RAM:IRC.log")
  103. @ENDNODE
  104.  
  105. @NODE "Tcp Put$"
  106. @NEXT "Tcp Read"
  107. @PREV "Tcp F Open"
  108. @TOC "Main"
  109. =Tcp Put$(<Logical file number>,<string$>)
  110.  
  111. Send a string to the TCP port
  112.  
  113. e.g. X=Tcp Put$(1,"NICK Giark")
  114. @ENDNODE
  115.  
  116. @NODE "Tcp Read"
  117. @NEXT "Tcp Code"
  118. @PREV "Tcp Put$"
  119. @TOC "Main"
  120. =Tcp Read(<logical file number>,<buffer>,<size>)
  121.  
  122. Get <size> bytes from the channel, and put them into the <buffer>, a
  123. previously defined AMOS bank.
  124.  
  125. e.g  S=Start(10) : X=Tcp Read(1,S,100)
  126.  
  127. Using the bank as a buffer allows the command to run asynchronously. The
  128. command doesn't wait for data to become available, it just sends a request
  129. to the channel. When there is data to be read, Gui Wait will inform you.
  130.  
  131. A very simple example:
  132.  
  133. S=Start(10)
  134. A=Tcp Read(1,S,100)
  135. B=Gui Wait
  136. If B=-9 : Rem TCP/IP message received
  137.  D=Tcp Code : Rem D=number of bytes received
  138.  B=Tcp Buffer : Rem B=address of the buffer where the data is stored
  139. EndIf
  140. @ENDNODE
  141.  
  142. @NODE "Tcp Code"
  143. @NEXT "Tcp Time"
  144. @PREV "Tcp Read"
  145. @TOC "Main"
  146. =Tcp Code
  147.  
  148. When you receive a TCP/IP message (Gui wait returns -9) you can obtain the
  149. associated code
  150.  
  151. e.g. if you receive the result of a read request, Tcp Code returns the number
  152. of bytes received. If it's a write request, Tcp Code returns the number of
  153. bytes transferred.
  154. @ENDNODE
  155.  
  156. @NODE "Tcp Time"
  157. @NEXT "Tcp Send"
  158. @PREV "Tcp Code"
  159. @TOC "Main"
  160. =Tcp Time
  161.  
  162. Returns the amount of time elapsed since the last Tcp Reset.
  163. @ENDNODE
  164.  
  165. @NODE "Tcp Send"
  166. @NEXT "Tcp Reset"
  167. @PREV "Tcp Time"
  168. @TOC "Main"
  169. =Tcp Send(<logical file number>,<buffer>,<code>)
  170.  
  171. Send the specified number of bytes, starting from <buffer>, to the channel.
  172. Like Tcp Read, this command is asynchronous. The command doesn't wait for the
  173. end of the transfer, but quits immediately so your program can continue its
  174. work. When the transfer is complete, you will receive a TCP/IP message. See
  175. the @{"above" LINK "Tcp Read"} example.
  176.  
  177. e.g. X=Tcp Send(1,S,125)
  178. @ENDNODE
  179.  
  180. @NODE "Tcp Reset"
  181. @NEXT "Tcp Channel"
  182. @PREV "Tcp Send"
  183. @TOC "Main"
  184. Tcp Reset
  185.  
  186. Resets the TCP internal timer. After using Tcp Time you can read the amount
  187. of time elapsed since the last Tcp Reset.
  188. @ENDNODE
  189.  
  190. @NODE "Tcp Channel"
  191. @NEXT "Tcp Buffer"
  192. @PREV "Tcp Reset"
  193. @TOC "Main"
  194. =Tcp Channel
  195.  
  196. Returns the channel number associated with the TCP/IP message returned by
  197. Gui Wait
  198. @ENDNODE
  199.  
  200. @NODE "Tcp Buffer"
  201. @PREV "Tcp Channel"
  202. @TOC "Main"
  203. =Tcp Buffer
  204.  
  205. Returns the buffer address associated with the TCP/IP message returned by
  206. Gui Wait.
  207.  
  208. e.g if you receive the result of a read request (Tcp Read) Tcp Buffer is
  209. the address where the data is stored.
  210. @ENDNODE
  211.  
  212. ---------------CUT------------------
  213.  
  214. Well met and godspeed,
  215.                       Giark
  216.                                            joehick@golden.net
  217.                              http://www.golden.net/~joehick/fbn/index.html
  218.      ______  ______    _____  .------------------------------------------.
  219.     / ____/ / __  /   / ___ \ !     AMOS games, utilities, demos, etc.   !
  220.    / /__   / /_/ /   / /  / / !                                          !
  221.   / ___/  / ___  |  / /  / /  !       CyberSpace BBS (519)579-0072       !
  222.  / /     / /__/ /  / /  / /   !     on A2000 060/50MHz (519)579-0173     !
  223. /_/     /______/  /_/  /_/    !                                          !
  224.    Fly By Nite Videe-Oh!      !  FBN Amiga 500 020 14MHz 1C/5F RAM 3.1OS !
  225.          IAPA Member          `------------------------------------------'
  226.